#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>

char * _strcpy(char *va, char *vb)
{
  /*40077c:	a9bd7bfd 	stp	x29, x30, [sp, #-48]!
  400780:	910003fd 	mov	x29, sp
  400784:	f9000fa0 	str	x0, [x29, #24]	// va
  400788:	f9000ba1 	str	x1, [x29, #16]	// vb

  40078c:	f9400fa0 	ldr	x0, [x29, #24]	// x0=va
  400790:	f100001f 	cmp	x0, #0x0
  400794:	54000080 	b.eq	4007a4 <_strcpy+0x28>  // b.none

  400798:	f9400ba0 	ldr	x0, [x29, #16]	// x0=vb
  40079c:	f100001f 	cmp	x0, #0x0
  4007a0:	54000141 	b.ne	4007c8 <_strcpy+0x4c>  // b.any

  4007a4:	90000000 	adrp	x0, 400000 <_init-0x5b8>
  4007a8:	91296002 	add	x2, x0, #0xa58
  4007ac:	90000000 	adrp	x0, 400000 <_init-0x5b8>
  4007b0:	91272001 	add	x1, x0, #0x9c8
  4007b4:	90000000 	adrp	x0, 400000 <_init-0x5b8>
  4007b8:	91274000 	add	x0, x0, #0x9d0
  4007bc:	aa0203e3 	mov	x3, x2
  4007c0:	52800102 	mov	w2, #0x8                   	// #8
  4007c4:	97ffffab 	bl	400670 <__assert_fail@plt>*/
	assert( (va != NULL) && (vb != NULL));

  /*4007c8:	f9400fa0 	ldr	x0, [x29, #24]
  4007cc:	f90017a0 	str	x0, [x29, #40]
  4007d0:	d503201f 	nop*/
	char *a = va;

  /*4007d4:	f9400ba1 	ldr	x1, [x29, #16]	// x1=vb
  4007d8:	91000420 	add	x0, x1, #0x1	// x0=vb+1
  4007dc:	f9000ba0 	str	x0, [x29, #16]	// [x29+16]=vb+1
  4007e0:	f9400fa0 	ldr	x0, [x29, #24]	// x0=va
  4007e4:	91000402 	add	x2, x0, #0x1	// x2=va+1
  4007e8:	f9000fa2 	str	x2, [x29, #24]	// [x29+24]=va+1
  4007ec:	39400021 	ldrb	w1, [x1]	// w1=*vb
  4007f0:	39000001 	strb	w1, [x0]	// *va=*vb
  4007f4:	39400000 	ldrb	w0, [x0]	// w0=*va
  4007f8:	7100001f 	cmp	w0, #0x0		// *va?=0
  4007fc:	54fffec1 	b.ne	4007d4 <_strcpy+0x58>*/  // b.any
	while ( (*va++ = *vb++) != '\0');

  /*400800:	f94017a0 	ldr	x0, [x29, #40]
  400804:	a8c37bfd 	ldp	x29, x30, [sp], #48
  400808:	d65f03c0 	ret*/
	return a;
}

int main()
{
  /*40080c:	a9bc7bfd 	stp	x29, x30, [sp, #-64]!
  400810:	910003fd 	mov	x29, sp
  400814:	f9000bf3 	str	x19, [sp, #16]

  400818:	90000000 	adrp	x0, 400000 <_init-0x5b8>
  40081c:	91294001 	add	x1, x0, #0xa50
  400820:	910083a0 	add	x0, x29, #0x20
  400824:	b9400022 	ldr	w2, [x1]
  400828:	b9000002 	str	w2, [x0]
  40082c:	b8401021 	ldur	w1, [x1, #1]
  400830:	b8001001 	stur	w1, [x0, #1]*/
	char a[5] = "asdf";

  /*400834:	90000000 	adrp	x0, 400000 <_init-0x5b8>
  400838:	9127c000 	add	x0, x0, #0x9f0
  40083c:	f9001fa0 	str	x0, [x29, #56]*/
	char *p1 = "name";

  /*400840:	d2800280 	mov	x0, #0x14                  	// #20
  400844:	97ffff6f 	bl	400600 <malloc@plt>
  400848:	f90017a0 	str	x0, [x29, #40]*/
	char *p2 = malloc(20);

  /*40084c:	d2800282 	mov	x2, #0x14                  	// #20
  400850:	52800001 	mov	w1, #0x0                   	// #0
  400854:	f94017a0 	ldr	x0, [x29, #40]
  400858:	97ffff72 	bl	400620 <memset@plt>*/
	memset(p2, 0, 20);

  /*40085c:	90000000 	adrp	x0, 400000 <_init-0x5b8>
  400860:	9127e000 	add	x0, x0, #0x9f8
  400864:	f90017a0 	str	x0, [x29, #40]*/
	p2 = "xiaozhixiaozhixiaozhixiaozhixiaozhixiaozhi";

  /*400868:	f9401fa0 	ldr	x0, [x29, #56]
  40086c:	97ffff61 	bl	4005f0 <strlen@plt>
  400870:	aa0003f3 	mov	x19, x0
  400874:	910083a0 	add	x0, x29, #0x20
  400878:	97ffff5e 	bl	4005f0 <strlen@plt>
  40087c:	aa0003e1 	mov	x1, x0
  400880:	90000000 	adrp	x0, 400000 <_init-0x5b8>
  400884:	9128a000 	add	x0, x0, #0xa28
  400888:	d28000a5 	mov	x5, #0x5                   	// #5
  40088c:	aa0103e4 	mov	x4, x1
  400890:	d2800103 	mov	x3, #0x8                   	// #8
  400894:	aa1303e2 	mov	x2, x19
  400898:	f9401fa1 	ldr	x1, [x29, #56]
  40089c:	97ffff71 	bl	400660 <printf@plt>*/
	printf("%s %d %d %d %d\n", p1, strlen(p1), 8, strlen(a), 5);

  /*4008a0:	f94017a0 	ldr	x0, [x29, #40]
  4008a4:	97ffff53 	bl	4005f0 <strlen@plt>
  4008a8:	aa0003e1 	mov	x1, x0
  4008ac:	90000000 	adrp	x0, 400000 <_init-0x5b8>
  4008b0:	91290000 	add	x0, x0, #0xa40
  4008b4:	d2800103 	mov	x3, #0x8                   	// #8
  4008b8:	aa0103e2 	mov	x2, x1
  4008bc:	f94017a1 	ldr	x1, [x29, #40]
  4008c0:	97ffff68 	bl	400660 <printf@plt>*/
	printf(" %s %d %d\n", p2, strlen(p2), 8);	

  /*4008c4:	b90037bf 	str	wzr, [x29, #52]*/
	int i = 0;

  /*4008c8:	1400000b 	b	4008f4 <main+0xe8>
  4008cc:	f9401fa0 	ldr	x0, [x29, #56]
  4008d0:	91000401 	add	x1, x0, #0x1
  4008d4:	f9001fa1 	str	x1, [x29, #56]
  4008d8:	39400002 	ldrb	w2, [x0]
  4008dc:	b98037a0 	ldrsw	x0, [x29, #52]
  4008e0:	910083a1 	add	x1, x29, #0x20
  4008e4:	38206822 	strb	w2, [x1, x0]
  4008e8:	b94037a0 	ldr	w0, [x29, #52]
  4008ec:	11000400 	add	w0, w0, #0x1
  4008f0:	b90037a0 	str	w0, [x29, #52]
  4008f4:	b94037a0 	ldr	w0, [x29, #52]
  4008f8:	7100081f 	cmp	w0, #0x2
  4008fc:	54fffe8d 	b.le	4008cc <main+0xc0>*/
	for (i = 0; i < 3; i++)
		a[i] = *p1++;

  /*400900:	910083a0 	add	x0, x29, #0x20
  400904:	97ffff53 	bl	400650 <puts@plt>*/
	puts(a);

  /*400908:	52800000 	mov	w0, #0x0                   	// #0
  40090c:	f9400bf3 	ldr	x19, [sp, #16]
  400910:	a8c47bfd 	ldp	x29, x30, [sp], #64
  400914:	d65f03c0 	ret*/
		return 0;
}
